/**
 * 给定字符串S，问把其中D个@符号改为点号后，点号一共有多少个
 */
#include <bits/stdc++.h>
#include <bits/extc++.h>
using namespace std;

using llt = long long;
using vi = vector<int>;
using vll = vector<llt>;
using pii = pair<int, int>;
using pll = pair<llt, llt>;

int N, D;
string S;

void work(){
    cin >> N >> D >> S;
    int ans = D;
    for(auto ch : S){
        if('.' == ch) ans += 1;
    }
    cout << ans << endl;
    return;
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);	
    int nofkase = 1;
	// cin >> nofkase;
	while(nofkase--) work();
	return 0;
}